<?php

namespace Acme\StaffBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Acme\StaffBundle\Entity\Comment
 *
 * @ORM\Table(name="comment")
 * @ORM\Entity
 */
class Comment {

  /**
   *
   * @var integer $id
   * @ORM\Column(name="id", type="integer", nullable=false)
   * @ORM\Id
   * @ORM\GeneratedValue(strategy="IDENTITY")
   * 
   */
  private $id;

  /**
   *
   * @var Staff
   * @ORM\ManyToOne(targetEntity="Staff") 
   * @ORM\JoinColumn(name="staff_id", referencedColumnName="id")
   */
  private $staff;

  /**
   * @var text $text
   *
   * @ORM\Column(name="description", type="text", nullable=false)
   */
  private $text;

  /**
   *
   * @var Comment
   * @ORM\ManyToOne(targetEntity="Comment")
   * @ORM\JoinColumn(name="parent_id", referencedColumnName="id")
   * 
   */
  private $parent_comment;

  /**
   *
   * @var type
   * @ORM\OneToMany(targetEntity="Comment", mappedBy="parent_comment") 
   */
  private $child_comments;

  /**
   * Get id
   *
   * @return integer 
   */
  public function getId() {
    return $this->id;
  }

  /**
   * Set parent_comment
   *
   * @param Acme\StaffBundle\Entity\Comment $parentComment
   */
  public function setParentComment(\Acme\StaffBundle\Entity\Comment $parentComment) {
    $this->parent_comment = $parentComment;
  }

  /**
   * Get parent_comment
   *
   * @return Acme\StaffBundle\Entity\Comment 
   */
  public function getParentComment() {
    return $this->parent_comment;
  }

  public function __construct() {
    $this->child_comments = new \Doctrine\Common\Collections\ArrayCollection();
  }

  /**
   * Add child_comments
   *
   * @param Acme\StaffBundle\Entity\Comment $childComments
   */
  public function addComment(\Acme\StaffBundle\Entity\Comment $childComments) {
    $this->child_comments[] = $childComments;
  }

  /**
   * Get child_comments
   *
   * @return Doctrine\Common\Collections\Collection 
   */
  public function getChildComments() {
    return $this->child_comments;
  }

  /**
   * Set text
   *
   * @param text $text
   */
  public function setText($text) {
    $this->text = $text;
  }

  /**
   * Get text
   *
   * @return text 
   */
  public function getText() {
    return $this->text;
  }

  /**
   * Set staff
   *
   * @param Acme\StaffBundle\Entity\Staff $staff
   */
  public function setStaff(\Acme\StaffBundle\Entity\Staff $staff) {
    $this->staff = $staff;
  }

  /**
   * Get staff
   *
   * @return Acme\StaffBundle\Entity\Staff 
   */
  public function getStaff() {
    return $this->staff;
  }

}